home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Toolbox
/
Visual Basic Toolbox (P.I.E.)(1996).ISO
/
printing
/
vsview17
/
fdesk.frm
< prev
next >
Wrap
Text File
|
1994-11-04
|
12KB
|
424 lines
VERSION 2.00
Begin Form fdesk
BackColor = &H0080FFFF&
Caption = "Form1"
ClientHeight = 5805
ClientLeft = 450
ClientTop = 870
ClientWidth = 8670
ControlBox = 0 'False
Height = 6300
Left = 345
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 5805
ScaleWidth = 8670
Top = 480
Width = 8880
Begin vsInForm InForm
BarColor = &H00800080&
BarColorInactive= &H00800080&
BarHeight = 16
ButtonsLeft = 3 '3
ButtonsRight = 2 '2
CapAlign = 1 'Left Center
CapColor = &H00FFFFFF&
CapColorInactive= &H00FFFFFF&
Caption = " VideoSoft SmartDesk"
ClipMon = -1 'True
ConvInfo = FDESK.FRX:0000
FontBold = -1 'True
FontItalic = 0 'False
FontName = "Small Fonts"
FontSize = 6.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
FrameColor = &H00C0C0C0&
FrameColorInactive= &H00C0C0C0&
FrameStyle = 4 'Raised Frame
FrameWidth = 10
Left = 6600
PictLeft0 = FDESK.FRX:000B
PictLeft1 = FDESK.FRX:00D5
PictLeft2 = FDESK.FRX:019F
PictRight0 = FDESK.FRX:0269
PictRight1 = FDESK.FRX:0333
Top = 4800
End
Begin PictureBox Picture4
BackColor = &H00C0C0C0&
Height = 4935
Left = 105
ScaleHeight = 4125
ScaleWidth = 4800
TabIndex = 2
Top = 240
Width = 5100
Begin vsInForm vsInForm3
AcceptFiles = -1 'True
BarColorInactive= &H00808000&
BarHeight = 34
ButtonsLeft = 0 '0
ButtonsRight = 3 '3
CapColorInactive= &H00FFFFFF&
Caption = "Visual Printer"
ConvInfo = FDESK.FRX:03FD
CustomFrame = -1 'True
FontBold = -1 'True
FontItalic = 0 'False
FontName = "Arial"
FontSize = 12
FontStrikethru = 0 'False
FontUnderline = 0 'False
FrameColor = &H00C0C0C0&
FrameColorInactive= &H00C0C0C0&
FrameCorners = 0 'False
FrameSizing = 0 'None
FrameStyle = 3 'Raised Form
FrameWidth = 10
Left = 480
PictRight0 = FDESK.FRX:0408
PictRight1 = FDESK.FRX:0612
PictRight2 = FDESK.FRX:07FC
Top = 3120
End
Begin vsViewPort vsViewPort1
BackColor = &H00808080&
ConvInfo = FDESK.FRX:09F6
Height = 3870
Left = 105
Top = 105
VirtualHeight = 0
VirtualWidth = 0
Width = 4530
Begin vsPrinter vsPrinter
ConvInfo = FDESK.FRX:0A01
FontName = "Arial"
FontSize = 24
HdrColor = &H00FF0000&
HdrFontBold = -1 'True
HdrFontName = "Bookman Old Style"
HdrFontSize = 18
Header = "|VideoSoft VSView"
Height = 2430
Left = 105
Top = 105
Width = 2640
End
End
End
Begin PictureBox Picture1
BackColor = &H00C0C0C0&
Height = 1590
Index = 0
Left = 5460
ScaleHeight = 840
ScaleWidth = 2655
TabIndex = 0
Top = 210
Width = 2955
Begin vsInForm VSInForm2
BarColor = &H00808000&
BarColorInactive= &H00800080&
BarHeight = 30
BarStyle = 3 'Raised
ButtonsLeft = 0 '0
CapAlign = 1 'Left Center
CapColor = &H00FFFFFF&
CapColorInactive= &H00FFFFFF&
Caption = " Most used API Calls"
ConvInfo = FDESK.FRX:0A0C
CustomFrame = -1 'True
FrameColor = &H00C0C0C0&
FrameColorInactive= &H00C0C0C0&
FrameCorners = 0 'False
FrameSizing = 0 'None
FrameStyle = 3 'Raised Form
FrameWidth = 10
Index = 0
Left = -15
Top = -135
End
Begin Label lStatus
BackStyle = 0 'Transparent
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 645
Index = 0
Left = 0
TabIndex = 1
Top = 105
Width = 2535
End
End
Begin PictureBox Picture1
BackColor = &H00C0C0C0&
Height = 2220
Index = 1
Left = 5460
ScaleHeight = 1470
ScaleWidth = 2655
TabIndex = 3
Top = 2205
Width = 2955
Begin ComboBox cmb_printers
Height = 300
Left = 630
Style = 2 'Dropdown List
TabIndex = 5
Top = 105
Width = 1905
End
Begin vsInForm VSInForm2
BarColor = &H00800080&
BarColorInactive= &H00800080&
BarHeight = 30
BarStyle = 3 'Raised
ButtonsLeft = 0 '0
CapAlign = 1 'Left Center
CapColor = &H00FFFFFF&
CapColorInactive= &H00FFFFFF&
Caption = " Printer Settings"
ConvInfo = FDESK.FRX:0A17
CustomFrame = -1 'True
FrameColor = &H00C0C0C0&
FrameColorInactive= &H00C0C0C0&
FrameCorners = 0 'False
FrameSizing = 0 'None
FrameStyle = 3 'Raised Form
FrameWidth = 10
Index = 2
Left = -15
Top = 495
End
Begin Label lStatus
BackStyle = 0 'Transparent
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 960
Index = 1
Left = 0
TabIndex = 4
Top = 525
Width = 2640
End
End
Begin Image Pin
Height = 150
Index = 0
Left = 105
Picture = FDESK.FRX:0A22
Top = 0
Visible = 0 'False
Width = 150
End
Begin Image Pin
Height = 150
Index = 1
Left = 300
Picture = FDESK.FRX:0AEC
Top = 60
Visible = 0 'False
Width = 150
End
End
Option Explicit
Sub cmb_printers_Click ()
Dim s$
mousepointer = 11
vsPrinter.Device = cmb_printers.List(cmb_printers.ListIndex)
s = "Orientation: " + vsPrinter.Orientation + Chr(13)
s = s + "DPI: " + vsPrinter.DPI + Chr(13)
s = s + "Port: :" + vsPrinter.Port + Chr(13)
s = s + "Driver: :" + vsPrinter.Driver
lStatus(1) = s
mousepointer = 0
End Sub
Sub Form_Load ()
Inform.CustomFrame = True
Dim s$
'Most Used APIs
s = "Mem: " + Format(Inform.FreeMemory \ 1024, "#,###") + "k" + Chr(13)
s = s + "Sys:" + Str(Inform.FreeSystem) + "%"
s = s + " Usr:" + Str(Inform.FreeUser) + "%"
s = s + " GDI:" + Str(Inform.FreeGDI) + "%"
lStatus(0) = s
' Display Printer Settings
Dim i%
For i = 0 To vsPrinter.NDevices - 1
cmb_printers.AddItem vsPrinter.Devices(i)
Next i
cmb_printers.ListIndex = 0
vsPrinter.Width = vsPrinter.PageWidth
vsPrinter.Height = vsPrinter.PageHeight
VSViewPort1.VirtualWidth = vsPrinter.PageWidth
VSViewPort1.VirtualHeight = vsPrinter.PageHeight
Me.Show
vsPrinter.Preview = True
MsgBox " Drag TEXT files from File Manager to the Visual Printer"
End Sub
Sub Form_Paint ()
'vsPrinter.Top = VSViewPort1.VirtualHeight / 2
End Sub
Sub GoPrint (c As Control)
Dim i%, fn$, fl&
vsPrinter.PageBorder = 3 'top and bottom
For i = 0 To c.NumFiles - 1
' set header and footer
fn = c.FileName(i)
fl = FileLen(fn)
vsPrinter.FileName = fn
vsPrinter.Header = fn + "||Page %d"
vsPrinter.Footer = FileDateTime(fn) + "|VideoSoft VSView|"
If fl > 10 * 1024 Then
vsPrinter.Footer = vsPrinter.Footer + Format(fl / 1024, "###,###,###") + " K bytes"
Else
vsPrinter.Footer = vsPrinter.Footer + Format(fl, "###,###,###") + " bytes"
End If
vsPrinter.Action = 1
Next
Form_Paint
End Sub
Sub InForm_ClickLButton (Button As Integer)
Dim s$
Select Case Button
' button 0 is end
Case 0
Unload Me
' button 1 is keep on top
Case 1
Inform.OnTop = Not Inform.OnTop
If Inform.OnTop Then
Inform.PictLeft1 = Pin(1)
Else
Inform.PictLeft1 = Pin(0)
End If
' button 2 is help
Case 2
s = "Drag files from the file manager into the Visual printer"
s = s + Chr(13) + "Use pin button to keep the window on top"
MsgBox s
End Select
End Sub
Sub InForm_ClickRButton (Button As Integer)
Select Case Button
' button 0 is maximize/restore
Case 0
InForm_DblClickCaption
' button 1 is minimize
Case 1
WindowState = 1
End Select
End Sub
Sub InForm_DblClickCaption ()
If WindowState = 0 Then
WindowState = 2
ElseIf WindowState = 2 Then
WindowState = 0
End If
End Sub
Sub InForm_NewClipboardData ()
' eV = Clipboard.GetText()
' If eV = "" Then
' eV.Picture = Clipboard.GetData()
' End If
End Sub
Sub vsInForm3_ClickRButton (Button As Integer)
Static Zoom%
mousepointer = 11
DoEvents
Select Case Button
Case 0 'Zoom
Zoom = Zoom + 20
If Zoom > 100 Then Zoom = 20
vsPrinter.Width = vsPrinter.PageWidth * Zoom / 100 * 2.15
vsPrinter.Height = vsPrinter.PageHeight * Zoom / 100 * 2.15
VSViewPort1.VirtualWidth = vsPrinter.Width
VSViewPort1.VirtualHeight = vsPrinter.Height
Case 1 'Print file
If vsPrinter.FileName <> "" Then
vsPrinter.Preview = False
vsPrinter.Action = 1
vsPrinter.Preview = True
End If
Case 2 'Clear the printer
vsPrinter.FileName = ""
vsPrinter.PageBorder = 0 'none
vsPrinter.Header = ""
vsPrinter.Footer = ""
vsPrinter.Action = 3
vsPrinter.Action = 6
End Select
mousepointer = 0
End Sub
Sub vsInForm3_DropFile ()
' print file
mousepointer = 11
vsPrinter.Preview = True
vsPrinter.PreviewPage = 1
GoPrint vsInform3
mousepointer = 0
End Sub